﻿using ThingsEdge.Router.Forwarders;

namespace Digitalmes.Infrastructure.Scada.Forwarders;

/// <summary>
/// 心跳处理。
/// </summary>
internal sealed class NativeHeartbeatForwarder(ILogger<NativeHeartbeatForwarder> logger) : INativeHeartbeatForwarder
{
    public Task ChangeAsync(HeartbeatForwarderContext context, CancellationToken cancellationToken)
    {
        logger.LogInformation("心跳监控，设备名称：{DeviceName}，状态：{State}", context.Device.Name, context.IsOnline ? "on" : "off");

        return Task.CompletedTask;
    }
}
